﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WcfVS2010.Client.Web
{
    public partial class HelloWord : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            SrvRef.Person p = new SrvRef.Person();
            p.Age = 24;
            p.Name = "xmchen";

            var personSrv = new SrvRef.PersonServiceClient();
            personSrv.AddPerson(p);


            this.DataList1.DataSource = personSrv.GetAllPerson();
            this.DataList1.DataBind();
        }
    }
}